<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">

  <!-- STYLES -->

  <script src="cordova.js"></script>
  <script>
    function loadApp() {
      // see http://stackoverflow.com/questions/23662121/cordova-plugins-only-work-in-ios-the-second-time-its-opened-with-a-thread-warnin
      cordova.exec.setJsToNativeBridgeMode(cordova.exec.jsToNativeModes.XHR_NO_PAYLOAD);

      var head = document.getElementsByTagName('head')[0];
      var script = document.createElement('script');
      script.type = 'text/javascript';
      script.src = 'main.js';
      head.appendChild(script);
    }
    document.addEventListener("deviceready", loadApp, false);
  </script>
</head>
<body>
  <div id="app"><!-- CONTENT --></div>
  <!-- DATA -->
</body>
</html>